﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FavoritesAdd.ascx.cs"
    Inherits="TCDC_System.UserControl.FavoritesAdd" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<style type="text/css">
    .icon-exclamation
    {
        padding-left: 25px !important;
        background: url(../../Attribute/images/icons/exclamation.png) no-repeat 3px 3px !important;
    }
    .icon-accept
    {
        padding-left: 25px !important;
        background: url(../../Attribute/images/icons/accept.png) no-repeat 3px 3px !important;
    }
</style>
<ext:Window ID="WindowDashboardAdd" runat="server" Icon="Group" Title="Dashboard"
    Width="600" Height="300" AutoShow="false" Modal="true" Hidden="true" Layout="Fit">
    <TopBar>
        <ext:Toolbar ID="Toolbar1" runat="server">
            <Items>
                <ext:ToolbarFill ID="ToolbarFill1" runat="server" />
                <ext:Button ID="btnSaveRecord" runat="server" Icon="Disk" Text="Save">
                    <DirectEvents>
                        <Click OnEvent="SaveDashboard" Before="return #{FormPanel1}.getForm().isValid();">
                            <EventMask ShowMask="true" />
                        </Click>
                    </DirectEvents>
                </ext:Button>
            </Items>
        </ext:Toolbar>
    </TopBar>
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Padding="5" Frame="true" LabelWidth="150"
            MonitorValid="true" Width="500" DefaultAnchor="-20" Height="230">
            <Items>
                <ext:TextField ID="txt_description" runat="server" FieldLabel="description" Width="300"
                    AllowBlank="false" MsgTarget="Title" />
                <ext:NumberField ID="txt_parent_id" runat="server" FieldLabel="parent_id" Width="300"
                    AllowBlank="false" MsgTarget="Title" />
                <ext:NumberField ID="txt_sorting_no" runat="server" FieldLabel="sorting_no" Width="300"
                    AllowBlank="false" MsgTarget="Title" />
                <ext:NumberField ID="txt_function_id" runat="server" FieldLabel="function_id" Width="300"
                    AllowBlank="false" MsgTarget="Title" />
                <ext:TextField ID="txt_Link" runat="server" FieldLabel="Link" Width="300" AllowBlank="false"
                    MsgTarget="Title" />
                <ext:FileUploadField ID="FileUpload1" runat="server" Width="300" FieldLabel="icon"
                    Icon="ImageAdd" />
            </Items>
            <BottomBar>
                <ext:StatusBar ID="StatusBar1" runat="server" Height="25" />
            </BottomBar>
            <Listeners>
                <ClientValidation Handler="this.getBottomToolbar().setStatus({text : valid ? 'Form is valid' : 'Form is invalid', iconCls: valid ? 'icon-accept' : 'icon-exclamation'});" />
            </Listeners>
        </ext:FormPanel>
    </Items>
</ext:Window>
